package com.cci.kangdao.controller;

import com.cci.kangdao.service.FaultCodeQueryFeedBackRecordTService;
import com.cci.kangdao.utilTool.ParameterTool;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@Controller
public class FaultCodeQueryFeedBackRecordTController {
	
	private Logger log = Logger.getLogger(this.getClass().getName());
	
	@Autowired
	private FaultCodeQueryFeedBackRecordTService faultCodeQueryFeedBackRecordTService;


	/**
	 * 点赞点踩接口
	 * @param paramStr
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/clickLikeOrStepOn.aspx", method= RequestMethod.POST)
	public ModelAndView clickLikeOrStepOn(@RequestBody String paramStr, HttpServletRequest request,
								  HttpServletResponse response ) {
		try{
			return faultCodeQueryFeedBackRecordTService.clickLikeOrStepOn(paramStr,request,response);
		}catch(Exception ex){
			log.error(ex.getMessage(),ex);
			String msg = "{\"status\": 1,\"msg\": \"系统异常\"}";
			ParameterTool.writeResponse(response, msg);
		}
		return null;
	}
}
